<?php

/**
 * fftt actions.
 *
 * @package    cpfaizenay
 * @subpackage fftt
 * @author     Manu
 * @version    1.0
 */
class ffttActions extends sfActions
{
 /**
  * Executes loadFfttComRss action
  *
  * @param sfRequest $request A request object
  */
  public function executeLoadFfttComRss(sfWebRequest $request) {
    
    if ($request->isXmlHttpRequest()){

        $feed = sfFeedPeer::createFromWeb(sfConfig::get('app_fftt_rssFfttComUri'));
        $feed_fftt_com = sfFeedPeer::aggregate(array($feed), array('limit' => 3));

        return $this->renderPartial('fftt/newsContent', array('feed' => $feed_fftt_com));
    }

  }

  /**
  * Executes loadFfttComRss action
  *
  * @param sfRequest $request A request object
  */
  public function executeLoadFfttTvRss(sfWebRequest $request) {

    if ($request->isXmlHttpRequest()){

        $feed = sfFeedPeer::createFromWeb(sfConfig::get('app_fftt_rssFfttTvUri'));
        $feed_fftt_tv = sfFeedPeer::aggregate(array($feed), array('limit' => 4));

        return $this->renderPartial('fftt/newsContent', array('feed' => $feed_fftt_tv));
    }

  }

}